:root {
  --border: #CBD5E1;
  --white: #ffffff;
  --primary_emphasis: #0F172A;
  --secondary_emphasis: #585858;
  --placeholder: #94A3B8;
  --disabled: ;
  --primary_blue: #274FA1;
  --black: #000000;
  --pink: #FF2D55;
  --darkPink: #C9072C;
  --mainLEDdisplay: #F0F0F0;


  /* states colors */
  /* --pressed: ; */
  --hover: var(--primary_blue);
  --hover_bg: #F0F2F8;
  /* --focused: ; */
  --focus_bg: rgba(39, 79, 161, 0.30);
  /* --selected: ; */
}


body{
    display: flex;
    flex-direction: column;
    align-items: center;
    border-collapse: collapse;
    user-select: none;
}
h1{
    font-family: sans-serif;
    text-align: center;
    color: var(--primary_emphasis);
}
p{
    font-family: sans-serif;
    margin-top: -12px;
    margin-bottom: 60px;
    color: var(--secondary_emphasis);
    text-align: center;
    max-width: 600px;
}
#input_field_parent{
    display: flex;
    flex-direction: column;
    color: var(--primary_emphasis);
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px; 
    gap: 6px;
}
#input_field{
    display: flex;
    width: 300px;
    text-align: right;
    display: flex;
    padding: 8px 12px 8px 56px;
    align-items: center;
    align-self: stretch;
    color: #0F172A; 
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px; 
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #FFF;
    position: relative;
}
#input_field::placeholder{
    color: var(--placeholder);
}
.currencyPrefix{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 24px;
    margin: 1px 0 1px 1px;
    padding: 8px 14px 8px 18px;
    border-radius: 6px 0 0 6px;
    font-size: 18px;
    border-right: 1px solid var(--border);
    font-weight: 400;
    /* color picked for IT portal */
    background-color: #F2F2F2; 
    pointer-events: none;
}

.flex_row{
    display: flex;
    flex-direction: row;
}

#calculate_button, .calculate_button_OFF{
    cursor: pointer;
    padding: 4px 10px;
    margin-left: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--white);
    transition: background-color 0.3s ease, 
                transform 0.1s ease, 
                box-shadow 0.2s ease;
}
#calculate_button:hover{
    border-radius: 6px;
    border: 1px solid var(--hover);
    background: var(--hover_bg);
}
#calculate_button:hover path{
    fill:var (--hover);
}
/* focus color issue...resolve later */
#calculate_button:focus-within{
    border: 1px solid var(--focus_bg);
}
#calculate_button:active{
    border-radius: 6px;
    border: 1px solid var(--primary_blue);
    background: var(--primary_blue);
}
.calculate_button_ON {
    border: 1px solid var(--primary_blue) !important;
    background: var(--primary_blue) !important;
}
.calculate_button_ON path{
    fill: var(--white) !important;
}
#calculate_button:active path{
    fill: var(--white);
}

#calculate_parent{
    width: 425px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--white);
    height: 396px;
    overflow-y: hidden;
    margin-top: 24px;
}
.hidden{
    display: none;
}
.visible {
    display: block;
}

#calculate_heading{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    height: 28px;
    border-bottom: 1px solid var(--border);
    color: var(--secondary_emphasis);
    font-family: Inter;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
}
#calculate_parent_body{
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow-y: hidden;
    height: 367px;
}
#calculation_history{
    width: 35%;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    height: 100%;
    
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.calculation_history_container{
    display: flex;
    padding: 10px 8px 10px 0px;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.three_dot_icon_button{
    cursor: pointer;
    outline: none;
    border: none;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
}
.three_dot_icon_button svg{
    display: inline-flex;
}
.three_dot_icon_button:hover{
    background-color: var(--hover_bg);
    border-radius: 0 50% 50% 0;
}
.calculation_history_item_dropdown{
    position: relative;
    display: inline-block;
    flex-direction: column;
}
.calculation_history_item_dropdown_menu{
    position: absolute;
    top: 40px;
    left: 10px;
    background-color: var(--white);
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.09);
    display: none;  /* hidden by default */
    flex-direction: column;
    width: 120px;
    z-index: 1000;
    border-radius: 6px;
    align-items: flex-start;
    padding: 4px 0px;
}
.calculation_history_item_dropdown_menu_item{
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: Inter;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px; 
    display: flex;
    padding: 6px 8px;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    cursor: pointer;  
}
.calculation_history_item_dropdown_menu_item:hover{
    background-color: var(--hover_bg);
}
.calculation_history_item_dropdown_menu_item[data-action="removeCalculation"]{
    color: red;
}
.calculation_history_text_primary{
    color: var(--primary_emphasis);
    text-align: center;
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal; 
    display: inline-flex;
    text-align: right;
}
.calculation_history_text_secondary{
    color: var(--secondary_emphasis);
    text-align: center;
    font-family: Inter;
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    display: inline-flex;
    flex-wrap: wrap;
    word-break: break-all;
    text-align: right;
}
#calculator{
    width: 65%;
    height: 100%;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
#display_screen{
    width: 252px;
    height: 80px;
    flex-shrink: 0;
    background-color: var(--mainLEDdisplay);
    padding: 12px;
    margin: 0px 0px 10px 0px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: end;
    gap: 2px;
    position: relative;
    border-bottom: 1px solid var(--border);
}
#save_current_calculation_button{
    position: absolute;
    left: 0;
    top: 0;
    border: none;
    opacity: 0.2;
    width: 40px;
    height: 40px;
    padding-bottom: 8px;
    padding-right: 16px;
    background: none;
    cursor: pointer;
}
#save_current_calculation_button:hover, #use_current_calculation_button:hover{
    opacity: 0.8;
}
@keyframes pressMoveLeft {
  0%   { transform: translateX(0); }
  30%  { transform: translateX(-3px); }
  60%  { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}
@keyframes pressMoveTop {
    0%   { transform: translateY(0); }
    30%  { transform: translateY(-3px); }
    60%  { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}
#save_current_calculation_button:active{
    opacity: 0.8;
    animation: pressMoveLeft 0.25s cubic-bezier(.5,1.6,.4,1.03);
}
#use_current_calculation_button:active{
    opacity: 0.8;
    animation: pressMoveTop 0.25s cubic-bezier(.5,1.6,.4,1.03);
}
#save_current_calculation_button:focus, #use_current_calculation_button:focus{
    outline: none;
}
#use_current_calculation_button{
    position: absolute;
    left: 0;
    bottom: 0;
    border: none;
    opacity: 0.3;
    width: 40px;
    height: 40px;
    padding-top: 16px;
    padding-right: 16px;
    background-color: none;
    cursor: pointer;
}
#display_screen_text_primary{
    color: var(--primary_emphasis);
    text-align: right;
    font-family: Inter;
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px; /* 100% */  
    text-align: right; 
}
#display_screen_text_secondary{
    color: var(--secondary_emphasis);
    font-family: Inter;
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-align: right;
    width: 100%;
    overflow-wrap: break-word;
    white-space: normal;
}

#grid-container-numbers{
      display: grid;
      grid-template-columns: repeat(4, 40px); 
      grid-template-rows: repeat(3, 40px);    
      gap: 10px;                            
      padding: 1px 8px;
}

.grid-item-number{
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--white);
    cursor: pointer; 

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    width: 40px;

    color: var(--primary_emphasis);
    text-align: center;
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px; /* 142.857% */

    transition:
    background-color 0.4s cubic-bezier(.4,0,.2,1),
    color 0.4s cubic-bezier(.4,0,.2,1),
    transform 0.4s cubic-bezier(.4,0,.2,1);
}
.grid-item-number:hover{
    border: 1px solid var(--hover);
    background-color: var(--hover_bg);
}
.grid-item-number:active{
    border: 1px solid var(--primary_blue);
    background-color: var(--primary_blue);
    color: var(--white);
}

#grid-container-operator{
    display: grid;
    grid-template-columns: auto; 
    grid-template-rows: repeat(4, 40px);    
    gap: 10px;                            
    padding: 1px 8px;
    cursor: pointer; 
}
.grid-item-operator{
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--white);
    cursor: pointer; 

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0px 0px 2px 0px;
    width: 52px;

    color: var(--primary_emphasis);
    
    font-family: Inter;
    font-size: 24px;
    font-style: normal;
    font-weight: 300;
    line-height: auto; /* 142.857% */

    transition:
    background-color 0.4s cubic-bezier(.4,0,.2,1),
    color 0.4s cubic-bezier(.4,0,.2,1),
    transform 0.4s cubic-bezier(.4,0,.2,1);
}
.grid-item-operator:hover{
    border: 1px solid var(--hover);
    background: var(--hover_bg);
}
.grid-item-operator:active {
    border: 1px solid var(--primary_blue);
    background: var(--primary_blue);
    color: var(--white);
}
#equalsTo{
    display: flex;
    width: 100%;
    margin: 8px 8px 8px 8px;
    padding: 10px 0;
    justify-content: center;
    align-items: center;

    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--white); 
    cursor: pointer;  

    transition:
    background-color 0.4s cubic-bezier(.4,0,.2,1),
    color 0.4s cubic-bezier(.4,0,.2,1),
    transform 0.4s cubic-bezier(.4,0,.2,1);
}
#equalsTo:hover{
    border: 1px solid var(--hover);
    background-color: var(--hover_bg);
}
#equalsTo:active{
    border: 1px solid var(--primary_blue);
    background-color: var(--primary_blue);
    color: var(--white);
}
#deleteButton {
    border: 1px solid var(--pink);
    background-color: var(--pink);
    color: var(--white);
    grid-column: span 2;
    width: 100%;

    transition:
    background-color 0.4s cubic-bezier(.4,0,.2,1),
    color 0.4s cubic-bezier(.4,0,.2,1),
    transform 0.4s cubic-bezier(.4,0,.2,1);
}
#clearCurrentCalculationButton {
    border: 1px solid var(--pink);
    background-color: var(--pink);
    color: var(--white);
    grid-column: span 1;
    width: 100%;

    transition:
    background-color 0.4s cubic-bezier(.4,0,.2,1),
    color 0.4s cubic-bezier(.4,0,.2,1),
    transform 0.4s cubic-bezier(.4,0,.2,1);
}
#deleteButton:hover , #clearCurrentCalculationButton:hover{
    background-color: var(--darkPink);
    border: 1px solid var(--darkPink);
}
#deleteButton:active , #clearCurrentCalculationButton:active{
    background-color: var(--darkPink);
    border: 1px solid var(--white);
}



